using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceModel;
using DevExpress.Xpo.DB;
using System.Reflection;
using System.ComponentModel;
using DevExpress.Data.Filtering;

namespace Common 
{
	[ServiceContract]
	public interface IDataStoreContract 
    {
		[OperationContract]
		AutoCreateOption GetAutoCreateOption( );

		[OperationContract]
		[ServiceKnownType(typeof(InsertStatement))]
		[ServiceKnownType(typeof(DeleteStatement))]
		[ServiceKnownType(typeof(UpdateStatement))]
		[ServiceKnownType(typeof(ContainsOperator))]
		[ServiceKnownType(typeof(BetweenOperator))]
		[ServiceKnownType(typeof(BinaryOperator))]
		[ServiceKnownType(typeof(UnaryOperator))]
		[ServiceKnownType(typeof(InOperator))]
		[ServiceKnownType(typeof(GroupOperator))]
		[ServiceKnownType(typeof(OperandValue))]
		[ServiceKnownType(typeof(ParameterValue))]
		[ServiceKnownType(typeof(OperandProperty))]
		[ServiceKnownType(typeof(AggregateOperand))]
		[ServiceKnownType(typeof(FunctionOperator))]
		[ServiceKnownType(typeof(NotOperator))]
		[ServiceKnownType(typeof(NullOperator))]
		[ServiceKnownType(typeof(QueryOperand))]
		[ServiceKnownType(typeof(QuerySubQueryContainer))]
		ModificationResult ModifyData(params ModificationStatement[] dmlStatements);
		
        [OperationContract]
		[ServiceKnownType(typeof(ContainsOperator))]
		[ServiceKnownType(typeof(BetweenOperator))]
		[ServiceKnownType(typeof(BinaryOperator))]
		[ServiceKnownType(typeof(UnaryOperator))]
		[ServiceKnownType(typeof(InOperator))]
		[ServiceKnownType(typeof(GroupOperator))]
		[ServiceKnownType(typeof(OperandValue))]
		[ServiceKnownType(typeof(ParameterValue))]
		[ServiceKnownType(typeof(OperandProperty))]
		[ServiceKnownType(typeof(AggregateOperand))]
		[ServiceKnownType(typeof(FunctionOperator))]
		[ServiceKnownType(typeof(NotOperator))]
		[ServiceKnownType(typeof(NullOperator))]
		[ServiceKnownType(typeof(QueryOperand))]
		[ServiceKnownType(typeof(QuerySubQueryContainer))]
		SelectedData SelectData(params SelectStatement[] selects);

		[OperationContract]
		[ServiceKnownType(typeof(DBColumn))]
		[ServiceKnownType(typeof(DBIndex))]
		[ServiceKnownType(typeof(DBPrimaryKey))]
		UpdateSchemaResult UpdateSchema(bool dontCreateIfFirstTableNotExist, params DBTable[] tables);
	}
}
